<template>
  <q-dialog class="column" flat persistent v-model="showDialog">
    <div class="col no-shadow row wrap justify-center" style="max-width:80vw;max-height:80vh">
      <q-img :src="imagePath" style="max-width: 1024px">
      </q-img>
      <div>
        <q-btn flat round dense class="q-ml-sm" icon="mdi-close" @click="closeView()">
          <q-tooltip>关闭预览</q-tooltip>
        </q-btn>
      </div>
    </div>
  </q-dialog>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      imagePath: '',
      showDialog: false,
    };
  },
  watch: {},
  computed: {},
  methods: {
    show(src) {
      this.imagePath = src;
      this.showDialog = true;
    },
    closeView() {
      this.showDialog = false;
    },
  },
  created() { },
  mounted() { },
};
</script>
<style lang="stylus"></style>
